<?php
include '../../../wp-blog-header.php';
$id = $_POST['id'];

if(!empty($id))
{
$ids = explode('~',$id);
$deal_id = $ids ['0'];
$cat_id = $ids ['1'];

$deal = new Pod('deal',$deal_id);
$deal_name = $deal->get_field('name');

$api = new PodAPI();
$columns_cat['name'] = pods_sanitize(stripslashes($deal_name));
$columns_cat['camp_cat'] = $cat_id;
$params_cat = array('datatype' => 'deal', 'tbl_row_id' => $deal_id, 'columns' => $columns_cat);
$api->save_pod_item($params_cat);
echo 'Category Updated';
}
?>